<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改异议信息')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-dissentInfo-edit" th:object="${dissentInfo}">
            <input name="id" th:field="*{id}" type="hidden" id="id">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">质量异议单号：</label>
                <div class="col-sm-8">
                    <input name="dissentId" th:field="*{dissentId}" class="form-control" type="text" required readonly>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">物流单号：</label>
                <div class="col-sm-8">
                    <input name="transInfoId" th:field="*{transInfoId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">异议处理状态：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('dissent_status')}">
                        <input type="radio" th:id="${'dissentStatus_' + dict.dictCode}" name="dissentStatus" th:value="${dict.dictValue}" th:field="*{dissentStatus}">
                        <label th:for="${'dissentStatus_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>

            <div class="form-group">    
                <label class="col-sm-3 control-label">发起人姓名：</label>
                <div class="col-sm-8">
                    <input name="fromName" th:field="*{fromName}" class="form-control" type="text">
                </div>
            </div>

            <div class="form-group">    
                <label class="col-sm-3 control-label">发起人联系电话：</label>
                <div class="col-sm-8">
                    <input name="fromTel" th:field="*{fromTel}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script type="text/javascript">
        var prefix = ctx + "bus/dissentInfo";
        $("#form-dissentInfo-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            var id=$("#id").val();
            var url="";
            if(id==""){
                url=prefix + "/add";
            }else{
                url=prefix + "/edit";
            }
            if ($.validate.form()) {
                $.operate.save(url,  $('#form-dissentInfo-edit').serialize());
            }
        }
    </script>
</body>
</html>